---
title: "Measuring Subgroup Preferences in Conjoint Experiments"
author: Thomas J. Leeper, Sara B. Hobolt, and James Tilley
date: 2019-05-29
output: github_document
---

This repository contains the following files:

 - `manuscript.Rnw`: a knitr document containing the manuscript and all analysis reported in the paper
 - `references.bib`: a BibTeX reference library used in `manuscript.Rnw`
 - `apsa-leeper.bst`: a BibTeX style file used in `manuscript.Rnw`
 - `Makefile`: a makefile for compiling the final manuscript from the above files
 - `data/ballard-rosa.dta`: data for the Ballard-Rosa et al. study reproduced in the paper
 - `data/bechtel_scheve_pnas.dta`: data for the Bechtel and Scheve study reproduced in the paper
 - `data/hainmueller-candidate.dta`: data for the Hainmueller et al. candidate study reproduced in the paper
 - `data/hainmueller-immigrant.dta`: data for the Hainmueller et al. immigration study reproduced in the paper
 - `data/teele.dta`: data for the Teele et al. study reproduced in the paper

Running `make` on the command line will reproduce all results and the final `manuscript.pdf` from the above. Alternatively, `manuscript.Rnw` can be compiled directly using `Rscript -e "knitr::knit2pdf('manuscript.Rnw')"` on the command line or `knitr::knit2pdf('manuscript.Rnw')` from within R. The original analysis was performed with R 3.6.0.

The following R packages - and their dependencies - are required:

 - cregg (0.3.0)
 - ggplot2 (3.1.1)
 - gridExtra (2.3)
 - rio (0.5.16)

Version numbers in parentheses reflect the package versions used in the analysis, all of which were available from CRAN at that time. All analysis should complete within a minute or two; `manuscript.Rnw` uses chunk caching by default so subsequent compilations will use cached results.
